<?php if(!defined('BASEPATH'))exit('No direct script access allowed'); ?>
<?php $this->load->view('admin/global/header'); ?>
<?php $this->load->view('admin/global/left'); ?>
<table cellpadding="0" cellspacing="0">
    <tr>
        <td class="title"><?php if(isset($guide)){echo lang('EDIT').': '.lang('GUIDE');}else{echo lang('POST').': '.lang('GUIDE');} ?></td>
    </tr>
    <?php if(isset($denied)){ ?>
    <tr>
        <td class="bar">
            <div class="error"><?php echo lang('DENIED'); ?></div>
            <meta http-equiv="refresh" content="5; <?php echo base_url().ADMIN_PATH; ?>" />
        </td>
    </tr>
    <?php }else{ ?>
    <?php if($success == true){ ?>
    <tr>
        <td class="bar">
            <div class="success"><?php echo lang('SUCCESS_UPDATED_DATA'); ?></div>
            <meta http-equiv="refresh" content="1" />
        </td>
    </tr>
    <?php }else{ ?>
    <?php echo Modules::run('admin/bar_module/index', $buttons); ?>
    <tr>
        <td valign="top">
        <form name="frmPost" id="frmPost" method="post">
            <table class="form" align="center" cellpadding="0" cellspacing="0">
                <tr>
                    <td class="label"><span class="red">*</span> <?php echo lang('TITLE'); ?>:</td>
                    <td>
                        <input type="text" name="txtTitle" class="input" value="<?php if(isset($guide)){echo set_value('txtTitle', $guide->guiTitle);}else{echo set_value('txtTitle');} ?>" />
                        <?php echo form_error('txtTitle'); ?>
                    </td>
                </tr>
                <tr>
                    <td class="labelEditor"><span class="red">*</span> <?php echo lang('DETAIL'); ?></td>
                    <td>
                        <script language="javascript" src="<?php echo base_url(); ?>templates/editor/tiny_mce.js"></script>
                        <script language="javascript" src="<?php echo base_url(); ?>templates/admin/js/editor.js"></script>
                        <textarea name="txtDetail" id="txtDetail" class="textEditor"><?php if(isset($guide)){echo set_value('txtDetail', $guide->guiDetail);}else{echo set_value('txtDetail');} ?></textarea>
                        <?php echo form_error('txtDetail'); ?>
                    </td>
                </tr>
                <tr>
                    <td class="label"><?php echo lang('ORDER'); ?>:</td>
                    <td>
                        <input type="text" name="txtOrder" class="inputOrder" value="<?php if(isset($guide)){echo set_value('txtOrder', $guide->guiOrder);}else{echo set_value('txtOrder');} ?>" />
                        <?php echo form_error('txtOrder'); ?>
                    </td>
                </tr>
                <tr>
                    <td class="label0"><?php echo lang('ACTIVE'); ?>:</td>
                    <td>
                        <input type="checkbox" name="txtStatus" class="checkbox" value="1" <?php if(isset($guide) && (int)$guide->guiStatus == 1){echo set_checkbox('txtStatus', 1, true);}else{echo set_checkbox('txtStatus', 1);} ?> />
                    </td>
                </tr>
            </table>
        </form>
        </td>
    </tr>
    <?php } ?>
    <?php } ?>
</table>
<?php $this->load->view('admin/global/right'); ?>
<?php $this->load->view('admin/global/footer'); ?>